package com.qms.qep.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.qms.common.annotation.Excel;
import com.qms.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 批次信息对象 batch
 * 
 * @author qep
 */
public class Batch extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 批次号 */
    @Excel(name = "批次号")
    private String batchNo;

    /** 产品ID */
    @Excel(name = "产品ID")
    private Long productId;
    
    /** 产品名称 */
    @Excel(name = "产品名称")
    private String productName;

    /** 生产日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date productionDate;

    /** 生产线 */
    @Excel(name = "生产线")
    private String productionLine;

    /** 批次数量 */
    @Excel(name = "批次数量")
    private Integer quantity;

    /** 状态（1有效 0无效） */
    @Excel(name = "状态", readConverterExp = "1=有效,0=无效")
    private Integer status;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setBatchNo(String batchNo) 
    {
        this.batchNo = batchNo;
    }

    public String getBatchNo() 
    {
        return batchNo;
    }

    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }
    
    public String getProductName() 
    {
        return productName;
    }

    public void setProductName(String productName) 
    {
        this.productName = productName;
    }

    public void setProductionDate(Date productionDate) 
    {
        this.productionDate = productionDate;
    }

    public Date getProductionDate() 
    {
        return productionDate;
    }

    public void setProductionLine(String productionLine) 
    {
        this.productionLine = productionLine;
    }

    public String getProductionLine() 
    {
        return productionLine;
    }

    public void setQuantity(Integer quantity) 
    {
        this.quantity = quantity;
    }

    public Integer getQuantity() 
    {
        return quantity;
    }

    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("batchNo", getBatchNo())
            .append("productId", getProductId())
            .append("productName", getProductName())
            .append("productionDate", getProductionDate())
            .append("productionLine", getProductionLine())
            .append("quantity", getQuantity())
            .append("status", getStatus())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
} 